/**
 * total_sales
 * @author Brant Liu
 * @email lbf1988@qq.com
 * @date 2019/9/27
 * @version 1.0.0
 */
layui.define( function(exports){
    'use strict';

    var option = {
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'shadow'
            }
        },
        grid: {
            top: '15%',
            right: '3%',
            left: '5%',
            bottom: '12%'
        },
        xAxis: [{
            type: 'category',
            data: ['周一', '周二','周三', '周四', '周五', '周六', '周日'],
            axisLine: {
                show: true
            },
            axisLabel: {
                margin: 10,
                color: '#333',
                textStyle: {
                    fontSize: 14
                },
            },
        }],
        yAxis: [{
            axisLabel: {
                formatter: '{value}',
                color: '#333',
            },
            axisLine: {
                show: true
            },
            splitLine: {
                lineStyle: {
                    color: '#666',
                    type: 'dashed'
                }
            }
        }],
        series: [{
            type: 'bar',
            data: [300, 450, 770, 203, 255, 188, 156,300, 450, 770, 203, 255, 188, ],
            barWidth: '32px',
            itemStyle: {
                normal: {
                    color: '#40a9ff',
                    shadowColor: 'rgba(0,160,221,.25)',
                    shadowBlur: 4
                }
            },
            label: {
                normal: {
                    show: true,
                    lineHeight: 30,
                    width: 80,
                    height: 30,
                    backgroundColor: 'rgba(0,160,221,0.1)',
                    borderRadius: 200,
                    position: ['-8', '-40'],
                    distance: 1,
                    formatter: [
                        '    {d|●}',
                        ' {a|{c}}     \n',

                    ].join(' '),
                    rich: {
                        d: {
                            color: '#3CDDCF',
                        },
                        a: {
                            color: '#666',
                            align: 'center',
                        },

                    }
                }
            }
        }]
    };

    exports('total_sales', option);
});